<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title>文档列表 - 家哇(Jia Wa Admin)后台管理系统</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="css/style.min.css" rel="stylesheet">
</head>
  
<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <%--头部和侧边菜单栏--%>
    <jsp:include page="header.jsp"/>
    
    <!--页面主要内容-->
    <main class="lyear-layout-content">
      
      <div class="container-fluid">
        
        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" action="/After_end/DimGoodsItems" role="form">
                  <div class="input-group">
                    <div class="input-group-btn">
                      <input type="hidden" name="search_field" id="search-field" value="title">
                      <span class="btn btn-default dropdown-toggle" id="search-btn" data-toggle="dropdown"  aria-haspopup="true" aria-expanded="false">
                      检索
                      </span>
<%--                      <ul class="dropdown-menu">--%>
<%--                        <li> <a tabindex="-1" href="#" data-field="title">商品名</a> </li>--%>
<%--                        <li> <a tabindex="-1" href="#" data-field="cat_name">类型</a> </li>--%>
<%--                      </ul>--%>
                    </div>
                    <input id="Dim" type="text" class="form-control" value="" name="keyword" placeholder="请输入名称">
<%--                    <script>--%>
<%--                      $(function (){--%>
<%--                        $("#Dim").keydown(function(event) {--%>
<%--                          if (event.keyCode == 13) {--%>
<%--                            location.href="/After_end/DimGoodsItems";--%>
<%--                            return false;--%>
<%--                          }--%>
<%--                        })--%>
<%--                      })--%>
<%--                    </script>--%>
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <a class="btn btn-primary m-r-5" href="toAfterAddGoods"><i class="mdi mdi-plus"></i> 新增</a>
                  <a class="btn btn-success m-r-5" href="#!"><i class="mdi mdi-check"></i> 上架</a>
                  <a class="btn btn-warning m-r-5" href="#!"><i class="mdi mdi-block-helper"></i> 下架</a>
                  <a class="btn btn-danger" href="delAfterGoods"><i class="mdi mdi-window-close"></i> 删除</a>
                </div>
              </div>
              <div class="card-body">
                
                <div class="table-responsive">
                  <table class="table table-bordered">
                    <thead>
                      <tr>
                        <th>
                          <label class="lyear-checkbox checkbox-primary">
                            <input type="checkbox" id="check-all"><span></span>
                          </label>
                        </th>
                        <th>序号</th>
                        <th>产品名称</th>
                        <th>产品类型</th>
                        <th>产品价格</th>
                        <th>产品简介</th>
                        <th>产品库存</th>
                        <th>产品状态</th>
                        <th>操作</th>
                      </tr>
                    </thead>
                    <tbody>
                    <c:forEach items="${page.list}" var="goods">
                      <tr>
                        <td>
                          <label class="lyear-checkbox checkbox-primary">
                            <input type="checkbox" name="ids[]" value="1"><span></span>
                          </label>
                        </td>
                        <td>${goods.pid}</td>
                        <td>${goods.sname}</td>
                        <td>${goods.name}</td>
                        <td>${goods.sprice}</td>
                        <td>${goods.summary}</td>
                        <td>${goods.stock}</td>
                        <td><font class="text-success">正常</font></td>
                        <td>
                          <div class="btn-group">
                            <a class="btn btn-xs btn-default" href="toAfterMod?pid=${goods.pid}" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                            <a class="btn btn-xs btn-default" href="#!" title="查看" data-toggle="tooltip"><i class="mdi mdi-eye"></i></a>
                            <a class="btn btn-xs btn-default" href="delAfterGoods?pid=${goods.pid}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                          </div>
                        </td>
                      </tr>
                    </c:forEach>
                    </tbody>
                  </table>
                </div>
                  第${page.pageNum}页，共${page.pages}页，${page.total}条记录
                  <a href="AfterGoodList">首页</a>&nbsp;<a href="AfterGoodList?page=2">第二页</a>
                <%--<ul class="pagination">--%>
                <%--  <li class="disabled"><span>«</span></li>--%>
                <%--  <li class="active"><span>1</span></li>--%>
                <%--  <li><a href="#1">2</a></li>--%>
                <%--  <li><a href="#1">3</a></li>--%>
                <%--  <li><a href="#1">4</a></li>--%>
                <%--  <li><a href="#1">5</a></li>--%>
                <%--  <li><a href="#1">6</a></li>--%>
                <%--  <li><a href="#1">7</a></li>--%>
                <%--  <li><a href="#1">8</a></li>--%>
                <%--  <li class="disabled"><span>...</span></li>--%>
                <%--  <li><a href="#!">14452</a></li>--%>
                <%--  <li><a href="#!">14453</a></li>--%>
                <%--  <li><a href="#!">»</a></li>--%>
                <%--</ul>--%>
       
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->
  </div>
</div>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>
<script type="text/javascript">
$(function(){
   $(".nav-subnav:eq(1)").css("display","block");
    $('.search-bar .dropdown-menu a').click(function() {
        var field = $(this).data('field') || '';
        $('#search-field').val(field);
        $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
    });
});


</script>
</body>
</html>